#2 py list
list1 = [1,2,3,4,5,6,7,8]
print(list1[2])
#截取list1 的数据
print(list1[2:3])
#更新list1
list1[0] = 'a'
print(list1)

#添加list1
list1.append('dd')
print(list1)

#删除list1的数据
del list1[0]
print(list1)
print(list1[0])

#list 运算符

#list num
num = len(list1)
print(num)

#list 组合
l1 = [1,2,3]
l2 = [4,5,6]
l3 = l1 + l2
print(l3)

#copy
l4 = l1 * 4
print(l4)

#检查
check = 4 in l2
print(check)

#遍历
for x in l3:
	print(x)